package web;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import model.Army;
import model.Category;
import model.CategoryItems;
import model.Conpendium;
import model.Inventory;
import model.Item;
import model.User;


import com.googlecode.objectify.ObjectifyService;

/**
 */
public final class ContextInitializer
implements ServletContextListener
{
    @Override
    public void contextInitialized(final ServletContextEvent sce)
    {        
        ObjectifyService.register(Army.class);
        ObjectifyService.register(Category.class);
        ObjectifyService.register(CategoryItems.class);
        ObjectifyService.register(Conpendium.class);
        ObjectifyService.register(Inventory.class);
        ObjectifyService.register(Item.class);
        ObjectifyService.register(User.class);
    }

    @Override
    public void contextDestroyed(final ServletContextEvent sce)
    {
        // empty
    }
}
